/***************************************************************************
 *   This file is part of KLabeler                                         *
 *   Copyright (C) 2010 by Luca Bellonda                                   *
 *   lbellonda _at_ gmail.com                                              *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef TAGPROFILE_H
#define TAGPROFILE_H

#include <QString>
#include <QStringList>
#include <QDateTime>
#include <QVector>

class TagProfile
{
public:
    enum ESessionType {
        ALLACTIVITIES = 0, // estemporary
        ONEACTIVITY = 1,// current activity
        ACTIVITIESSET = 2,//activity set
    };
    static const int NAME_SIZE = 64;
    static const int DESCRIPTION_SIZE = 128;

private:
    QString id;
    QString name;
    QString description;
    ESessionType type;
    QStringList tags;
    QStringList activities;
    QDateTime  updatedOn;
    QDateTime  createdOn;
    bool enabled;

public:
    TagProfile();
    TagProfile(const QString &name);
    ~TagProfile();

    const QString & getId();
    const QString & getName();
    const QString & getDescription();
    ESessionType getType();
    QStringList &getTags();
    QStringList &getActivities();

    void setId(const QString & id);
    void setName(const QString & newName);
    void setDescription(const QString & newDescription);
    void setType(const TagProfile::ESessionType newType);
    void setCreatedOn(const QDateTime &value);
    void setUpdatedOn(const QDateTime &value);
    void setEnabled(const bool how);

    void addActivity(const QString &activity);
    void addTag(const QString &tag);
    void setTags(QStringList list);
    void setActivities(QStringList list);
    void resetTags();
    void resetActivities();
    bool isActivity(const QString &activityName);
    bool isEnabled();


    static TagProfile* getMockUp(const QString &name);
    static void deleteProfiles(QVector<TagProfile*> *profiles);
};

#endif // TAGPROFILE_H
